/*
@author https://yunp.top
 */

@file:JsQualifier("starling.text")

package starling.text

import starling.events.EventDispatcher

open external class TextFormat(
    font: String = definedExternally,
    size: Number = definedExternally,
    color: Long = definedExternally,
    horizontalAlign: String = definedExternally,
    verticalAlign: String = definedExternally
) : EventDispatcher {

    var bold: Boolean
    var color: Long
    var font: String
    var horizontalAlign: String
    var italic: Boolean
    var kerning: Boolean
    var leading: Number
    var letterSpacing: Number
    var size: Number
    var underline: Boolean
    var verticalAlign: String

    fun clone(): TextFormat
    fun copyFrom(format: TextFormat)
    fun setTo(
        font: String = definedExternally,
        size: Number = definedExternally,
        color: Long = definedExternally,
        horizontalAlign: String = definedExternally,
        verticalAlign: String = definedExternally
    )

    fun toNativeFormat(out: TextFormat = definedExternally): TextFormat
}